#include "whitecheckerboard.h"
#include "backcheckerboard.h"
#include "chessBoard.h"
#include "whiteplayer.h"
#include "backplayer.h"
#include "keydown.h"
#include "judge.h"
#include "winlogo.h"
int main(int argc, const char *argv[])
{
	ChessBoard *chessboard=ChessBoard::getChessBoard();
	chessboard->show();
	BackPlayer b("lfx");
	WhitePlayer w("lfx2");
	Player *players[]={
		&b,&w
	};
	KeyDown keydown;
	Judge judge;
	WinLogo winlogo;
	bool flag=true;
	while(flag){
		for(Player *player:players){
			keydown.click(player);
			bool ret=judge.isWin(player);
			if(ret){
				winlogo.show(player);
				flag=false;
				break;
			}
	
		}
	}
	printf("\n");

	return 0;
}
